/*
 * @Author: xws 1043495328@qq.com
 * @Date: 2023-07-22 14:45:40
 * @LastEditors: xws 1043495328@qq.com
 * @LastEditTime: 2023-07-22 15:21:13
 * @FilePath: \vue3-admin-template\src\api\user\index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '@/utils/request'
import type { loginFormData, loginResponseDate,userInfoResponseDate } from './type'

//统一管理接口
enum API {
  LOGIN_URL = '/admin/acl/index/login',
  USERINFO_URL = '/admin/acl/index/info',
  LOGOUT_URL = '/admin/acl/index/logout',
}
export const reqLogin = (data: loginFormData) =>
  request.post<any, loginResponseDate>(API.LOGIN_URL, data)
export const reqUserInfo = () => request.get<any, userInfoResponseDate>(API.USERINFO_URL)
export const reqLogout = () => request.post<any, any>(API.LOGOUT_URL)
